varying vec4 var_vec4_position;
varying vec3 var_vec3_normal;
uniform vec4 uni_vec4_frustum;//[far,near,width,height]
uniform vec4 uni_vec4_color;
uniform vec4 uni_vec4_ext;

void main()
{
    vec3 pos=var_vec4_position.xyz;
	vec3 nor=normalize(var_vec3_normal);
	if(!gl_FrontFacing)
	    nor=-nor;
	gl_FragData[0]=vec4(-pos.z/uni_vec4_frustum[0],0.0,0.0,0.0);
	gl_FragData[1]=vec4(nor,1.0);
	gl_FragData[2]=uni_vec4_color;
	gl_FragData[3]=uni_vec4_ext;
}